package com.tsd.core.openweixin.model.event;

import javax.xml.bind.annotation.XmlEnumValue;

/**
 * @author eric
 */
public enum EventType {

    @XmlEnumValue("CLICK")
    CLICK,
    @XmlEnumValue("subscribe")
    SUBSCRIBE,
    @XmlEnumValue("unsubscribe")
    UNSUBSCRIBE,
    @XmlEnumValue("LOCATION")
    LOCATION,
    @XmlEnumValue("SCAN")
    SCAN,
    @XmlEnumValue("MASSSENDJOBFINISH")
    MASSSENDJOBFINISH;

    public Class getEventClass() {
        if (this == CLICK) {
            return ClickEvent.class;
        } else if (this == SCAN) {
            return ScanEvent.class;
        } else if (this == SUBSCRIBE) {
            return SubscribeEvent.class;
        } else if (this == UNSUBSCRIBE) {
            return UnsubscribeEvent.class;
        } else if (this == MASSSENDJOBFINISH) {
            return MassSendJobFinishEvent.class;
        } else {
            return null;
        }
    }
}
